<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>天天互保-申请互保</title>
<meta name="keywords" content="天天互保"> 
<meta name="description" content="天天互保"> 
<meta content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" name="viewport">
<link rel="stylesheet" href="__CSS__/style.css">
<link rel="stylesheet" href="__CSS__/index.css">
<link rel="stylesheet" href="__CSS__/admin.css">
<link rel="stylesheet" href="__CSS__/type_info.css">
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/jquery.validate.js"></script>
<script src="__JS__/member.validate.js"></script>
<script type="text/javascript">
	$(function(){
		$(".files p").click(function(){
			$("#file").click();
			/*$("#file").bind("change",function () {
				uploadPhoto();
			});*/
		});
	})
</script>
</head>
<body>
<form action="__URL__/addhubao" id="form1"  enctype="multipart/form-data" method="post">
	<ul class="uslist font14">
		<li class="updates">
			<p>被保护人</p>
			<div class="inputs guanxi" >
				<div class="inputtype font14" id='famvalue'>请选择接受保障的权益人</div>
				<input type="hidden" name="buser" value=""  id='famvalue1'>
				<input type="hidden" name="type" value="{$type}" >
				<input type="hidden" name="fcard" value="{$Uarr.userid}" >
				<input type="hidden" name="gid" value="{$gid}" >
				<input type="hidden" name="fuser" value="{$Uarr.realname}" >
				<label class="errorinfo"><img src="__IMG__/selemore.png" class="selemore"></label>
			</div>
		</li>
		<li class="updates nobor_bottom" style="height:auto;overflow:hidden;">
			<p>描述</p>
			<div class="inputs" style="height:auto;overflow:hidden;">
				<textarea class="miaoshu font14" name="content" onfocus="if(value=='情况描述'){value=''}"
					onblur="if (value ==''){value='情况描述'}">情况描述</textarea>
				<label for="idcard" class="errorinfo"> </label>
			</div>
		</li>
		<li class="updates nobor_bottom" style="height:auto;overflow:hidden;">
		<input type="file" class="file" name="upload" value="上传文件" placeholder="">
			<!-- <p>&nbsp;</p>
			<div class="inputs filesa" style="height:auto;overflow:hidden;">
				<div class="scx"><img src="__IMG__/sqhb_l.jpg" class="ximg"><img src="__IMG__/x.png" class="xclose"/></div>
				<div class="scx"><img src="__IMG__/sqhb_l.jpg" class="ximg"><img src="__IMG__/x.png" class="xclose"/></div>
				<div class="scx"><img src="__IMG__/sqhb_l.jpg" class="ximg"><img src="__IMG__/x.png" class="xclose"/></div>
			</div> -->
		</li>
	</ul>
	<!-- <div class="files font12"><p><img src="__IMG__/sqhb_s.jpg">上传图片</p><a href="#">上传材料说明</a></div> -->
	<!-- <input type="file" value="" id="file" name="file[]" style="display:none;"/> -->
	<input type="button" value="申请" class="submits font14 top15">
	<div class="notes1 font14"><input type="checkbox" checked /> 同意《<a href="articles.html" style="color:#1089ef;">会员须知</a>》</div>
</form>
<!--BEGIN 弹出框-->
<div class="pop_up" id="pop1">
	<div class="pop_upbg" style="display:none"></div>
	<div class="pop_uplog1 font14">
		<div class="xialabg">
			<ul id="familyinfo">
				<li><span>{$Uarr.realname}(本人)</span></li>
			<foreach name="QArr" item="vo">
				<li><span>{$vo.qname}({$vo.twith})</span></li>
			</foreach>
			</ul>
			<img src="__IMG__/xialabg.png" class=""/>
		</div>
		<!-- <div class="xial_yes">
			<a href="#" class="lin_bottom">确定</a>
			<a href="#">取消</a>
		</div> -->
	</div>
</div>
<!--END 弹出框-->
<script>
$('.guanxi').on('click',function(){
	$('.pop_upbg').css('display','block');
	$('.pop_uplog1').animate({
		width:'100%',
		height:'150px',
	},1000,'swing');
})


$(".submits").click(function() {
	 var val=$("#famvalue1").val();
	 var file=$(".file").val();
	 if (val=='') {
	 	alert('保人不能为空');
	 }else if (file=='') {
	 	alert('文件不能为空');
	 }else{
	 	$('#form1').submit();
	 }
})
$(document).ready(function(){
	var obj_lis = document.getElementById("familyinfo").getElementsByTagName("span");
	for(i=0;i<obj_lis.length;i++){
		obj_lis[i].onclick = function(){
			document.getElementById("famvalue").innerHTML = this.innerHTML;
			document.getElementById("famvalue1").value = this.innerHTML;
		}
	}
	$('#familyinfo li').on('click',function(){
		$('.pop_upbg').css('display','none');
		$('.pop_uplog1').animate({
			width:'100%',
			height:'0',
		},300,'swing');
	})
})　

</script>
</body>
</html>